package com.samsung.dto.common;

/**
 * 
 * @ClassName: JSuccResult
 * @Description: 状态为true的Json返回
 * @author pu.huang
 * @date 2015年7月17日 上午10:04:04
 *
 */
public class JSuccResult extends BaseJsonResult {

	private static final long serialVersionUID = 1L;
	/**
	 * 状态值[成功：true 失败：false]
	 */
	private boolean flag = true;
	/**
	 * 提示消息
	 */
	private String msg;
	/**
	 * 返回数据
	 */
	private Object data;
	/**
	 * 回调地址
	 */
	private String callback;
	
	/**
	 * 返回状态值
	 */
	public JSuccResult() {
		super(true);
	}

	/**
	 * 返回状态值和提示信息
	 */
	public JSuccResult(String msg) {
		super(true, msg);
		this.msg = msg;
	}

	/**
	 * 返回状态值和数据
	 */
	public JSuccResult(Object data) {
		super(true, data);
		this.data = data;
	}
	
	/**
	 * 返回状态值、提示信息及数据
	 */
	public JSuccResult(String msg, Object data) {
		super(true, msg, data);
		this.msg = msg;
		this.data = data;
	}
	
	/**
	 * 返回状态值、提示信息、数据及回调
	 */
	public JSuccResult(String msg, Object data, String callback) {
		super(true, msg, data);
		this.msg = msg;
		this.data = data;
		this.callback = callback;
	}

	public boolean isFlag() {
		return flag;
	}

	public void setFlag(boolean flag) {
		this.flag = flag;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public String getCallback() {
		return callback;
	}

	public void setCallback(String callback) {
		this.callback = callback;
	}

	@Override
	public String toString() {
		return "JSuccResult [flag=" + flag + ", msg=" + msg + ", data=" + data
				+ ", callback=" + callback + "]";
	}

}
